import Rx from "rxjs"

var clicks = Rx.Observable.from([10,20]);
var ones = clicks.mapTo(1);
var seed = 0;
var count = ones.scan((acc, one) => acc + one, seed);
count.subscribe(x => console.log(x));